@ Practice04-Converting_an_ASCII_String_to_an_Integer

	ldr r12, addr_str	@ r3 = 0x9000
	eor r0, r0, r0		@ r0 = 0
	ldrb r11, [r12]		@ the 1st char
LOOP:
	cmp r11, #0		@ is it '\0' (NULL)?
	beq DONE
	mov r10, #10		@ r7 = 10
	mul r1, r0, r10
	sub r11, r11, #0x30	@ '0' in ascii
	add r0, r1, r11
	add r12, r12, #1
	ldrb r11, [r12]		@ get the next
	b LOOP
DONE:
	mov r1, r0
	ldr r0, addr_screen
	bl printInt
	b halt
addr_str:
	.word 0x9000
addr_screen:
	.word 0xD0000